<!DOCTYPE html>
<html>
<head>
    <%if(articleList.length!=0){%>
    <title><%=articleList[0].bookcase.name %></title>
    <%}%>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <link rel="stylesheet" href="//cdn.bootcss.com/weui/1.1.1/style/weui.min.css">
    <link rel="stylesheet" href="//cdn.bootcss.com/jquery-weui/1.0.1/css/jquery-weui.min.css">
    <% include ../../common/public.ejs %>
    <link href="https://cdn.bootcss.com/Swiper/3.0.4/css/swiper.css" rel="stylesheet">
    <link href="<%= global.config.path.publicPath %>/custom/css/articleTemplate.css" rel="stylesheet">
</head>
<body>

<% let bannerArr = bannerList %>
<div class="swiper-container">
    <div class="swiper-wrapper">
        <% for(let i = 0;i < bannerArr.length;i++){ %>
        <div class="swiper-slide">
            <img src="<%= global.config.path.publicPath %>/uploadFiles<%= bannerArr[i][0].filePath %>" alt="">
        </div>
        <% } %>
    </div>
    <!-- 如果需要分页器 -->
    <div class="swiper-pagination"></div>
</div>

<div>
    <% let artArr = articleList %>
    <%if(artArr.length!=0){%>
    <% for(let i = 0;i < artArr.length;i++){ %>
    <a href="<%= artArr[i].thirdUrl|| global.config.path.contextPath+'/fengqi/article/articleView/'+artArr[i].code %>">
        <div class="news-container">
            <div class="news-list">
                <div class="news-panel weui-flex">
                    <div class=" news-img">
                        <% if(artArr[i].img){ %>
                        <img src="<%= global.config.path.publicPath %>/uploadFiles<%= artArr[i].img.filePath %>" alt="">
                        <% } %>
                    </div>
                    <div class="news-title ">
                        <p class="title-font"><%= artArr[i].name %></p>
                        <span class="title-time">

                        </span>
                    </div>
                </div>
            </div>
        </div>
    </a>
    <% } %>
    <%}else {%>
    <img src="<%=global.config.path.publicPath%>/custom/images/icon/nomore.png" alt="" class="noMore">
    <h2 class="text-center">暂无更多内容啦</h2>
    <%}%>
</div>
<script src="//cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
<script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/jquery-weui.min.js"></script>
<script src="https://cdn.bootcss.com/Swiper/3.4.1/js/swiper.jquery.js"></script>
<script src="<%= global.config.path.publicPath %>/custom/js/articleTemplate.js"></script>

<script>
    //    $(".swiper-container").swiper()
    let swiper = new Swiper('.swiper-container', {
        pagination: '.swiper-pagination',
        paginationClickable: true,
        paginationBulletRender: function (swiper, index, className) {
            return '<span class="' + className + '">' + (index + 1) + '</span>';
        }
    });
</script>

</body>
</html>
